home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NetNews Offline 2
/
NetNews Offline Volume 2.iso
/
news
/
comp
/
std
/
c
/
102
< prev
next >
Wrap
Text File
|
1996-08-06
|
2KB
|
35 lines
Newsgroups: comp.std.c
Path: info.physics.utoronto.ca!utzoo!spenford!henry
From: Henry Spencer <henry@zoo.toronto.edu>
Subject: Re: Meaning of __STDC__?
References: <4d6673$8to@mailgate.bridgewater.ne.hcc.com>
Sender: henry%spenford@zoo.toronto.edu (Henry Spencer)
Organization: SP Systems, Toronto
Date: Sat, 13 Jan 1996 22:08:18 GMT
Message-ID: <DL545u.MBy%spenford@zoo.toronto.edu>
In article <4d6673$8to@mailgate.bridgewater.ne.hcc.com> kennedy1@bwmail1.hcc.com (John W Kennedy) writes:
>Is there an official statement as to what __STDC__ means? Does it mean "This
>compiler (in its current operating mode) fully supports ANSI Standard C," or
>does it mean "This compiler (in its current operating mode) disallows all
>extensions to ANSI Standard C."? In my opinion, common practice and the
>Rationale both support the former, rather than the latter, but is
>there an official ruling?
There can be no official ruling on behavior that is outside the standard,
such as extensions which do not contravene any of the standard's rules.
ANSI C does not preclude extensions, it only requires that they be invoked
by some mechanism whose semantics are left undefined (or implementation-
defined) by the standard, such as the use of a non-standard #include <>
header-file name.
Actually, the standard says that __STDC__ is 1 in ANSI C. It (necessarily)
says nothing about what __STDC__ might or might not be in non-standard C.
So technically you can't draw any conclusions at all from the presence of
__STDC__; the valid conclusion is `standard -> __STDC__', not vice-versa.
Of course, one would hope that most implementors have the sense to define
__STDC__ only when the standard is satisfied, but counterexamples do exist.
--
The Earth is our mother. | Henry Spencer
Our nine months are up... | henry@zoo.toronto.edu